#!/usr/bin/env python
import os
import sys
import getopt
import time

_verbose = False

def usage():
    print 'Usage: ' + sys.argv[0] + ' -u player-url -s save-dir [--id=ID,ID,ID --verbose --updatetag]'
    print 'example: ' + sys.argv[0] + ' -u http://www.xiami.com/song/play?ids=/song/playlist/id/22925049/type/3 -s /tmp/mp3.tmp/'

def main():
    pass

if __name__ == '__main__':
    # parse args
    opts, args = getopt.getopt(sys.argv[1:], 'hu:s:vt', ['hlep', 'player-url=', 'save-dir=', 'id=', 'verbose', 'updatetag'])
    for o, v in opts:
        if o in ['-h', '--help']:
            usage()
            exit(0)
        elif o in ['-v', '--verbose']:
            _verbose = True
    # check args

    main()

